home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 3 / ct-rom iiib.zip / ct-rom iiib / WINDOWS / DIVERSEN / WINE02BX / PICTURE.ELC < prev    next >
Text File  |  1993-03-28  |  18KB  |  234 lines

  1. ;;; compiled by @win386 on Sat Mar 13 14:32:46 1993
  2. ;;; from file c:/src/lucid-19.4/lisp/modes/picture.el
  3. ;;; emacs version 19.3 Lucid.
  4. ;;; bytecomp version 2.08; 27-aug-92.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (provide 'picture)
  14. (fset 'move-to-column-force #[(column) "└    !êië    W½ä    j¬ÿ\n    U?¡Æh├U¡ì─╞╟!ê\njê└    !)╚    )ç" [move-to-column column col 9 nil indent-tabs-mode delete-char -1 t zmacs-region-stays] 3 "\
  15. Move to column COLUMN in current line.
  16. Differs from move-to-column in that it creates or modifies whitespace
  17. if necessary to attain exactly the specified column."])
  18. (fset 'picture-end-of-line #[(&optional arg) "½å┴!Syê┬yê├`─êxç" [arg prefix-numeric-value 0 "     " nil] 3 "\
  19. Position point after last non-blank character on current line.
  20. With ARG not nil, move forward ARG - 1 lines first.
  21. If scan reaches end of buffer, stop there without error." "P"])
  22. (fset 'picture-forward-column #[(arg) "└i    \\!ç" [move-to-column-force arg] 3 "\
  23. Move cursor right, making whitespace if necessary.
  24. With argument, move that many columns." "p"])
  25. (fset 'picture-backward-column #[(arg) "└i    Z!ç" [move-to-column-force arg] 3 "\
  26. Move cursor left, making whitespace if necessary.
  27. With argument, move that many columns." "p"])
  28. (fset 'picture-move-down #[(arg) "i┴\n!ê├!)ç" [col picture-newline arg move-to-column-force] 2 "\
  29. Move vertically down, making whitespace if necessary.
  30. With argument, move that many lines." "p"])
  31. (defconst picture-vertical-step 0 "\
  32. Amount to move vertically after text character in Picture mode.")
  33. (defconst picture-horizontal-step 1 "\
  34. Amount to move horizontally after text character in Picture mode.")
  35. (fset 'picture-move-up #[(arg) "└    [!ç" [picture-move-down arg] 2 "\
  36. Move vertically up, making whitespace if necessary.
  37. With argument, move that many lines." "p"])
  38. (fset 'picture-movement-right #[nil "└┴┬\"ç" [picture-set-motion 0 1] 3 "\
  39. Move right after self-inserting character in Picture mode." nil])
  40. (fset 'picture-movement-left #[nil "└┴┬\"ç" [picture-set-motion 0 -1] 3 "\
  41. Move left after self-inserting character in Picture mode." nil])
  42. (fset 'picture-movement-up #[nil "└┴┬\"ç" [picture-set-motion -1 0] 3 "\
  43. Move up after self-inserting character in Picture mode." nil])
  44. (fset 'picture-movement-down #[nil "└┴┬\"ç" [picture-set-motion 1 0] 3 "\
  45. Move down after self-inserting character in Picture mode." nil])
  46. (fset 'picture-movement-nw #[nil "└┴ë\"ç" [picture-set-motion -1] 3 "\
  47. Move up and left after self-inserting character in Picture mode." nil])
  48. (fset 'picture-movement-ne #[nil "└┴┬\"ç" [picture-set-motion -1 1] 3 "\
  49. Move up and right after self-inserting character in Picture mode." nil])
  50. (fset 'picture-movement-sw #[nil "└┴┬\"ç" [picture-set-motion 1 -1] 3 "\
  51. Move down and left after self-inserting character in Picture mode." nil])
  52. (fset 'picture-movement-se #[nil "└┴ë\"ç" [picture-set-motion 1] 3 "\
  53. Move down and right after self-inserting character in Picture mode." nil])
  54. (fset 'picture-set-motion #[(vert horiz) "\n─┼\n╞ª╞ªT╟_╚\\\\╔¢@\"\n╦╠ !ê═╬!ç" [vert picture-vertical-step horiz picture-horizontal-step format "Picture:%s" 2 3 1 (nw up ne left none right sw down se) mode-name set-buffer-modified-p buffer-modified-p message ""] 5 "\
  55. Set VERTICAL and HORIZONTAL increments for movement in Picture mode.
  56. The mode line is updated to reflect the current direction."])
  57. (fset 'picture-move #[nil "└    !ê┬ !ç" [picture-move-down picture-vertical-step picture-forward-column picture-horizontal-step] 2 "\
  58. Move in direction of  picture-vertical-step  and  picture-horizontal-step."])
  59. (fset 'picture-motion #[(arg) "└    \n_!ê├     _!ç" [picture-move-down arg picture-vertical-step picture-forward-column picture-horizontal-step] 3 "\
  60. Move point in direction of current picture motion in Picture mode.
  61. With ARG do it that many times.  Useful for delineating rectangles in
  62. conjunction with diagonal picture motion.
  63. Do \\[command-apropos]  picture-movement  to see commands which control motion." "p"])
  64. (fset 'picture-motion-reverse #[(arg) "└    [!ç" [picture-motion arg] 2 "\
  65. Move point in direction opposite of current picture motion in Picture mode.
  66. With ARG do it that many times.  Useful for delineating rectangles in
  67. conjunction with diagonal picture motion.
  68. Do \\[command-apropos]  picture-movement  to see commands which control motion." "p"])
  69. (fset 'picture-self-insert #[(arg) "┴V¡ÜS┬iT!ê├─!êcê─uê╞ ê╟¬aç" [arg 0 move-to-column-force delete-char -1 last-input-char picture-move nil zmacs-region-stays] 2 "\
  70. Insert this character in place of character previously at the cursor.
  71. The cursor then moves in the direction you previously specified
  72. with the commands picture-movement-right, picture-movement-up, etc.
  73. Do \\[command-apropos]  picture-movement  to see those commands." "p"])
  74. (fset 'picture-clear-column #[(arg) "`ië\n\\─ !ê`|êè     ]j,ç" [opoint original-col arg target-col move-to-column-force] 3 "\
  75. Clear out ARG columns after point without moving." "p"])
  76. (fset 'picture-backward-clear-column #[(arg) "└    [!ç" [picture-clear-column arg] 2 "\
  77. Clear out ARG columns before point, moving back over them." "p"])
  78. (fset 'picture-clear-line #[(arg) "½ò┴!┬!ê├─V½â¬é[!ç┼╞!½è╟`╚yê`\"ê¬ê╔`╩ê`\"ê╩ë ç" [arg prefix-numeric-value kill-line newline 0 looking-at "[     ]*$" kill-ring-save 1 kill-region nil zmacs-region-stays] 3 "\
  79. Clear out rest of line; if at end of line, advance to next line.
  80. Cleared-out line text goes into the kill ring, as do
  81. newlines that are advanced over.
  82. With argument, clear out (and save in kill ring) that many lines." "P"])
  83. (fset 'picture-newline #[(arg) "┴W½âyç┴V¡ö┬êm½à├ ê¬â─uêSë¬hç" [arg 0 nil newline 1] 3 "\
  84. Move to the beginning of the following line.
  85. With argument, moves that many lines (up, if negative argument);
  86. always moves to the beginning of a line." "p"])
  87. (fset 'picture-open-line #[(arg) "è└ê┴\n!)ç" [nil open-line arg] 2 "\
  88. Insert an empty line after the current line.
  89. With positive argument insert that many lines." "p"])
  90. (fset 'picture-duplicate-line #[nil "è└yê`┴┬!ê`{─yê c*ç" [0 picture-newline 1 contents -1] 3 "\
  91. Insert a duplicate of the current line, below it." nil])
  92. (defvar picture-tab-chars "!-~" "\
  93. *A character set which controls behavior of commands
  94. \\[picture-set-tab-stops] and \\[picture-tab-search].  It is NOT a
  95. regular expression, any regexp special characters will be quoted.
  96. It defines a set of \"interesting characters\" to look for when setting
  97. (or searching for) tab stops, initially \"!-~\" (all printing characters).
  98. For example, suppose that you are editing a table which is formatted thus:
  99. | foo        | bar + baz | 23  *
  100. | bubbles    | and + etc | 97  *
  101. and that picture-tab-chars is \"|+*\".  Then invoking
  102. \\[picture-set-tab-stops] on either of the previous lines would result
  103. in the following tab stops
  104.         :     :     :     :
  105. Another example - \"A-Za-z0-9\" would produce the tab stops
  106.   :          :    :     :
  107.  
  108. Note that if you want the character `-' to be in the set, it must be
  109. included in a range or else appear in a context where it cannot be
  110. taken for indicating a range (e.g. \"-A-Z\" declares the set to be the
  111. letters `A' through `Z' and the character `-').  If you want the
  112. character `\\' in the set it must be preceded by itself: \"\\\\\".
  113.  
  114. The command \\[picture-tab-search] is defined to move beneath (or to) a
  115. character belonging to this set independent of the tab stops list.")
  116. (fset 'picture-set-tab-stops #[(&optional arg) "è└\n½å├─!¬▒┼╞!╚Q    ╩yê` └ê╠     ═#½è╬└wêi    B¬m    ¼ê╧╨╞!\"ê*    ╤    GS    8T╥\"    ½ì    @╘Iê    Aë¼s╒!+ç" [nil tabs arg default-value tab-stop-list "[     ]+[" regexp-quote picture-tab-chars "]" regexp 0 bol re-search-backward t "     " error "No characters in set %s on this line." make-string 32 blurb 58 message] 5 "\
  117. Set value of  tab-stop-list  according to context of this line.
  118. This controls the behavior of \\[picture-tab].  A tab stop
  119. is set at every column occupied by an \"interesting character\" that is
  120. preceded by whitespace.  Interesting characters are defined by the
  121. variable  picture-tab-chars,  see its documentation for an example
  122. of usage.  With ARG, just (re)set  tab-stop-list  to its default value.
  123. The tab stops computed are displayed in the minibuffer with `:' at
  124. each stop." "P"])
  125. (fset 'picture-tab-search #[(&optional arg) "iè    ¼Æ┬yê├─!Pexêo¼ä╞!ê╟╚─!╔Qè╩ê`)╦#½àiS¬é╩)½à╠!¬ä┬yê╩)ç" [target arg 0 "^" regexp-quote picture-tab-chars move-to-column re-search-forward "[     ]+[" "]" nil move move-to-column-force] 4 "\
  126. Move to column beneath next interesting char in previous line.
  127. With ARG move to column occupied by next interesting character in this
  128. line.  The character must be preceded by whitespace.
  129. \"interesting characters\" are defined by variable  picture-tab-chars.
  130. If no such character is found, move to beginning of line." "P"])
  131. (fset 'picture-tab #[(&optional arg) "`┴ ê\n½ì├i`|ê j*¬ä╞ë)ç" [opoint move-to-tab-stop arg nil column indent-tabs-mode t zmacs-region-stays] 2 "\
  132. Tab transparently (just move point) to next tab stop.
  133. With prefix arg, overwrite the traversed text with spaces.  The tab stop
  134. list can be changed by \\[picture-set-tab-stops] and \\[edit-tab-stops].
  135. See also documentation for variable `picture-tab-chars'." "P"])
  136. (defconst picture-killed-rectangle nil "\
  137. Rectangle killed or copied by \\[picture-clear-rectangle] in Picture mode.
  138. The contents can be retrieved by \\[picture-yank-rectangle]")
  139. (fset 'picture-clear-rectangle #[(start end &optional killp) "└    \n #ëç" [picture-snarf-rectangle start end killp picture-killed-rectangle] 4 "\
  140. Clear and save rectangle delineated by point and mark.
  141. The rectangle is saved for yanking by \\[picture-yank-rectangle] and replaced
  142. with whitespace.  The previously saved rectangle, if any, is lost.
  143. With prefix argument, the rectangle is actually killed, shifting remaining
  144. text." "r\nP"])
  145. (fset 'picture-clear-rectangle-to-register #[(start end register &optional killp) "└    ┬ #\"ç" [set-register register picture-snarf-rectangle start end killp] 6 "\
  146. Clear rectangle delineated by point and mark into REGISTER.
  147. The rectangle is saved in REGISTER and replaced with whitespace.
  148. With prefix argument, the rectangle is actually killed, shifting remaining
  149. text." "r\ncRectangle to register: \nP"])
  150. (fset 'picture-snarf-rectangle #[(start end &optional killp) "i└è ½ç─\"¬ï╟\"╚\"ê)╔\n!ê└\n*ç" [nil indent-tabs-mode column killp delete-extract-rectangle start end extract-rectangle clear-rectangle move-to-column-force zmacs-region-stays] 4])
  151. (fset 'picture-yank-rectangle #[(&optional insertp) ":¼ä┴┬!ç├ \"ç" [picture-killed-rectangle error "No rectangle saved." picture-insert-rectangle insertp] 3 "\
  152. Overlay rectangle saved by \\[picture-clear-rectangle]
  153. The rectangle is positioned with upper left corner at point, overwriting
  154. existing text.  With prefix argument, the rectangle is inserted instead,
  155. shifting existing text.  Leaves mark at one corner of rectangle and
  156. point at the other (diagonally opposed) corner." "P"])
  157. (fset 'picture-yank-rectangle-from-register #[(register &optional insertp) "└    !ë:¼å├─    \"¬à┼\n\")ç" [get-register register rectangle error "Register %c does not contain a rectangle." picture-insert-rectangle insertp] 4 "\
  158. Overlay rectangle saved in REGISTER.
  159. The rectangle is positioned with upper left corner at point, overwriting
  160. existing text.  With prefix argument, the rectangle is
  161. inserted instead, shifting existing text.  Leaves mark at one corner
  162. of rectangle and point at the other (diagonally opposed) corner." "cRectangle from register: \nP"])
  163. (fset 'picture-insert-rectangle #[(rectangle &optional insertp) "└\n¼ôè├`─@G!ê╞GS!ê`\"ê)╟ ê╚!)ç" [nil indent-tabs-mode insertp delete-rectangle picture-forward-column rectangle picture-move-down push-mark insert-rectangle] 4 "\
  164. Overlay RECTANGLE with upper left corner at point.
  165. Optional argument INSERTP, if non-nil causes RECTANGLE to be inserted.
  166. Leaves the region surrounding the rectangle."])
  167. (byte-code "└┬─  ┼W½Å╞    ╟╚ \"╔#ê Të¬m╞    ╩╦#ê╞    ╠═#ê╞    ╬╧#ê╞    ╨╤#ê╞    ╥╙#ê╞    ╘╒#ê╞    ╓╫#ê╞    ╪┘#ê╞    ┌█#ê╞    ▄▌#ê╞    ▐▀#ê╞    αß#ê╞    Γπ#ê╞    Σσ#ê╞    Γµ#ê╞    τΦ#ê╞    ΘΩ#ê╞    δ∞#ê╞    φε#ê╞    ∩≡#ê╞    ±≥#ê╞    ≤⌠#ê╞    ⌡÷#ê╞    ≈°#ê╞    ∙·#ê╞    √ⁿ#ê╞    ²■#ê╞     ü@#ê╞    üAüB#ê╞    üCüD#ê╞    üEüF#ê)└ç" [nil picture-mode-map 32 i make-keymap 127 define-key make-string 1 picture-self-insert "" picture-forward-column "" picture-backward-column "" picture-clear-column "" delete-char "" picture-backward-clear-column " " picture-clear-line "" picture-open-line "" picture-newline "\n" picture-duplicate-line "" picture-move-down "" picture-move-up "" picture-end-of-line "    " picture-toggle-tab-state "    " picture-tab picture-tab-search "    " picture-set-tab-stops " " picture-clear-rectangle "" picture-clear-rectangle-to-register "" picture-yank-rectangle "" picture-yank-rectangle-from-register "" picture-mode-exit "" picture-motion "" picture-motion-reverse "<" picture-movement-left ">" picture-movement-right "^" picture-movement-up "." picture-movement-down "`" picture-movement-nw "'" picture-movement-ne "/" picture-movement-sw "\\" picture-movement-se] 6)
  168. (defvar edit-picture-hook nil "\
  169. If non-nil, it's value is called on entry to Picture mode.
  170. Picture mode is invoked by the command \\[edit-picture].")
  171. (fset 'edit-picture #[nil "┴=½ä┬├!ç─┼!ê╞ ╟!ê─╔!ê\n    ─╦!ê ┴─╠!ê═ ─╬!ê╧╬!─╨!ê╧╨!─╤!ê─╥!ê╙╘╒\"ê╓╫!ê╪┘┌!    \"ç" [major-mode edit-picture error "You are already editing a Picture." make-local-variable picture-mode-old-local-map current-local-map use-local-map picture-mode-map picture-mode-old-mode-name mode-name picture-mode-old-major-mode picture-killed-rectangle nil tab-stop-list default-value picture-tab-chars picture-vertical-step picture-horizontal-step picture-set-motion 0 1 run-hooks edit-picture-hook message substitute-command-keys "Type \\[picture-mode-exit] in this buffer to return it to %s mode."] 3 "\
  172. Switch to Picture mode, in which a quarter-plane screen model is used.
  173. Printing characters replace instead of inserting themselves with motion
  174. afterwards settable by these commands:
  175.   C-c <      Move left after insertion.
  176.   C-c >      Move right after insertion.
  177.   C-c ^      Move up after insertion.
  178.   C-c .      Move down after insertion.
  179.   C-c `      Move northwest (nw) after insertion.
  180.   C-c '      Move northeast (ne) after insertion.
  181.   C-c /      Move southwest (sw) after insertion.
  182.   C-c \\   Move southeast (se) after insertion.
  183. The current direction is displayed in the mode line.  The initial
  184. direction is right.  Whitespace is inserted and tabs are changed to
  185. spaces when required by movement.  You can move around in the buffer
  186. with these commands:
  187.   C-p      Move vertically to SAME column in previous line.
  188.   C-n      Move vertically to SAME column in next line.
  189.   C-e      Move to column following last non-whitespace character.
  190.   C-f      Move right inserting spaces if required.
  191.   C-b      Move left changing tabs to spaces if required.
  192.   C-c C-f Move in direction of current picture motion.
  193.   C-c C-b Move in opposite direction of current picture motion.
  194.   Return  Move to beginning of next line.
  195. You can edit tabular text with these commands:
  196.   M-Tab      Move to column beneath (or at) next interesting character.
  197.         `Indents' relative to a previous line.
  198.   Tab      Move to next stop in tab stop list.
  199.   C-c Tab Set tab stops according to context of this line.
  200.         With ARG resets tab stops to default (global) value.
  201.         See also documentation of variable    picture-tab-chars
  202.         which defines \"interesting character\".  You can manually
  203.         change the tab stop list with command \\[edit-tab-stops].
  204. You can manipulate text with these commands:
  205.   C-d      Clear (replace) ARG columns after point without moving.
  206.   C-c C-d Delete char at point - the command normally assigned to C-d.
  207.   Delete  Clear (replace) ARG columns before point, moving back over them.
  208.   C-k      Clear ARG lines, advancing over them.     The cleared
  209.         text is saved in the kill ring.
  210.   C-o      Open blank line(s) beneath current line.
  211. You can manipulate rectangles with these commands:
  212.   C-c C-k Clear (or kill) a rectangle and save it.
  213.   C-c C-w Like C-c C-k except rectangle is saved in named register.
  214.   C-c C-y Overlay (or insert) currently saved rectangle at point.
  215.   C-c C-x Like C-c C-y except rectangle is taken from named register.
  216.   \\[copy-rectangle-to-register]   Copies a rectangle to a register.
  217.   \\[advertised-undo]   Can undo effects of rectangle overlay commands
  218.         commands if invoked soon enough.
  219. You can return to the previous mode with:
  220.   C-c C-c Which also strips trailing whitespace from every line.
  221.         Stripping is suppressed by supplying an argument.
  222.  
  223. Entry to this mode calls the value of  edit-picture-hook  if non-nil.
  224.  
  225. Note that Picture mode commands will work outside of Picture mode, but
  226. they are not defaultly assigned to keys." nil])
  227. (fset 'picture-mode 'edit-picture)
  228. (fset 'picture-mode-exit #[(&optional nostrip) "┴=¼ä┬├!ç ¼â┼ ê╚    !ê\n╦╠!ê═╬ !ç" [major-mode edit-picture error "You aren't editing a Picture." nostrip picture-clean picture-mode-old-mode-name mode-name use-local-map picture-mode-old-local-map picture-mode-old-major-mode kill-local-variable tab-stop-list set-buffer-modified-p buffer-modified-p] 2 "\
  229. Undo edit-picture and return to previous major mode.
  230. With no argument strips whitespace from end of every line in Picture buffer
  231.   otherwise just return to previous mode." "P"])
  232. (fset 'picture-clean #[nil "èebê└┴┬├#¡ç─ö`|ê¬r)ç" [re-search-forward "[     ][     ]*$" nil t 0] 4 "\
  233. Eliminate whitespace at ends of lines."])
  234.